/**
 * 版权所有 (C), 2019-2019, XXX有限公司
 * 项目名：com.company.study.designpatterns.builder
 * 文件名: Director
 * 日期: 2019/6/15 13:13
 * 说明:
 */
package com.company.study.designpatterns.builder;

/**
 * 主管类
 *
 * @author Anbang713
 * @create 2019/6/15
 */
public class Director {
    private Builder builder = new ConcreteBuilder();

    /**
     * 组装电脑
     */
    public Computer builderComputer(String cpu, String memory, String disk) {
        builder.builderCpu(cpu);
        builder.builderMemory(memory);
        builder.builderDisk(disk);
        return builder.getComputer();
    }
}